package test.administrator.example.com.mobileshop.gen;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import test.administrator.example.com.mobileshop.db.Category;
import test.administrator.example.com.mobileshop.db.Test1_ListBean;
import test.administrator.example.com.mobileshop.db.Test2_ListBean;

import test.administrator.example.com.mobileshop.gen.CategoryDao;
import test.administrator.example.com.mobileshop.gen.Test1_ListBeanDao;
import test.administrator.example.com.mobileshop.gen.Test2_ListBeanDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig categoryDaoConfig;
    private final DaoConfig test1_ListBeanDaoConfig;
    private final DaoConfig test2_ListBeanDaoConfig;

    private final CategoryDao categoryDao;
    private final Test1_ListBeanDao test1_ListBeanDao;
    private final Test2_ListBeanDao test2_ListBeanDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        categoryDaoConfig = daoConfigMap.get(CategoryDao.class).clone();
        categoryDaoConfig.initIdentityScope(type);

        test1_ListBeanDaoConfig = daoConfigMap.get(Test1_ListBeanDao.class).clone();
        test1_ListBeanDaoConfig.initIdentityScope(type);

        test2_ListBeanDaoConfig = daoConfigMap.get(Test2_ListBeanDao.class).clone();
        test2_ListBeanDaoConfig.initIdentityScope(type);

        categoryDao = new CategoryDao(categoryDaoConfig, this);
        test1_ListBeanDao = new Test1_ListBeanDao(test1_ListBeanDaoConfig, this);
        test2_ListBeanDao = new Test2_ListBeanDao(test2_ListBeanDaoConfig, this);

        registerDao(Category.class, categoryDao);
        registerDao(Test1_ListBean.class, test1_ListBeanDao);
        registerDao(Test2_ListBean.class, test2_ListBeanDao);
    }
    
    public void clear() {
        categoryDaoConfig.clearIdentityScope();
        test1_ListBeanDaoConfig.clearIdentityScope();
        test2_ListBeanDaoConfig.clearIdentityScope();
    }

    public CategoryDao getCategoryDao() {
        return categoryDao;
    }

    public Test1_ListBeanDao getTest1_ListBeanDao() {
        return test1_ListBeanDao;
    }

    public Test2_ListBeanDao getTest2_ListBeanDao() {
        return test2_ListBeanDao;
    }

}
